<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>

<head>
    <head>
        <meta charset="utf-8">
        <title>商家中心</title>
        <link href="/Public/home/css/base.css" rel="stylesheet" type="text/css">
        <link href="/Public/home/css/seller_center.css" rel="stylesheet" type="text/css">
        <link href="/Public/home/font/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
        <link rel="shortcut icon" type="image/x-icon" href="/public/images/favicon.ico" media="screen" />
        <!--[if IE 7]>
        <link rel="stylesheet" href="font/font-awesome/css/font-awesome-ie7.min.css">
        <![endif]-->
        <script type="text/javascript" src="/Public/home/js/jquery.js"></script>
        <script type="text/javascript" src="/Public/home/js/seller.js"></script>
        <script type="text/javascript" src="/Public/home/js/waypoints.js"></script>
        <script type="text/javascript" src="/Public/home/js/jquery-ui/jquery-ui.min.js"></script>
        <script type="text/javascript" src="/Public/home/js/jquery.validation.min.js"></script>
        <script type="text/javascript" src="/Public/home/js/layer/layer.js"></script>
        <script type="text/javascript" src="/Public/home/js/global.js"></script>
        <script type="text/javascript" src="/Public/home/js/myAjax.js"></script>
        <script type="text/javascript" src="/Public/home/js/myFormValidate.js"></script>
        <script type="text/javascript" src="/Public/home/js/layer/laydate/laydate.js"></script>
        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
        <script src="/Public/home/js/html5shiv.js"></script>
        <script src="/Public/home/js/respond.min.js"></script>
        <![endif]--></head>
    <![endif]-->
</head>

<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<header class="ncsc-head-layout w">
    <div class="wrapper">
        <div class="ncsc-admin w252">
            <dl class="ncsc-admin-info">
                <dt class="admin-avatar"><img src="/public/static/images/seller/default_user_portrait.gif" width="32" class="pngFix" alt="" /></dt>
            </dl>
            <div class="ncsc-admin-function">
                <div class="index-search-container">
                    <p class="admin-name"><a class="seller_name" href="">seller</a></p>
                </div>
                <a class="iconshop" href="/index.php/Home/Store/index/store_id/1.html" title="前往店铺"><i class="icon-home"></i>&nbsp;店铺</a>
                <a class="iconshop" href="/index.php/seller/Admin/admin_info/seller_id/1.html" title="修改密码" target="_blank"><i class="icon-wrench"></i>&nbsp;设置</a>
                <a class="iconshop" href="<?php echo U('loginOut/index');?>" title="安全退出"><i class="icon-signout"></i>&nbsp;退出</a></div>
        </div>
        <div class="center-logo">
            <a href="/" target="_blank">
                <img src="/public/static/images/seller/seller_center_logo.png" class="pngFix" alt="" /></a>
            <h1>商家中心</h1>
        </div>
        <nav class="ncsc-nav">
            <dl>
                <dt><a href="/index.php">首页</a></dt>
                <dd class="arrow"></dd>
            </dl>


            <?php if(is_array($menu)): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><dl>
                    <dt><a href="/index.php?s=/Home/<?php echo ($vo["url"]); ?>"><?php echo ($vo["name"]); ?></a></dt>
                    <?php if($vo['list']): ?><dd>
                        <ul>
                            <?php if(is_array($vo["list"])): $i = 0; $__LIST__ = $vo["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><li> <a href='/index.php?s=/Home/<?php echo ($v["url"]); ?>'> <?php echo ($v["name"]); ?> </a> </li><?php endforeach; endif; else: echo "" ;endif; ?>

                        </ul>
                    </dd><?php endif; ?>
                    <dd class="arrow"></dd>
                </dl><?php endforeach; endif; else: echo "" ;endif; ?>


        </nav>
    </div>
</header>
<style>
    .w150 {
        margin-right: 35px;
    }

    .w378 {
        display: inline-block !important;
    }

    .di-in {
        display: inline-block !important;
    }

    .w160 {
        width: 160px !important;
    }

    .nscs-table-handle {
        border-right: 1px solid #dedede;
    }
</style>
        <!-- <header class="ncsc-head-layout w">
        <div class="wrapper">
        <div class="ncsc-admin w252">
        <dl class="ncsc-admin-info">
        <dt class="admin-avatar"><img src="images/seller/default_user_portrait.gif" width="32" class="pngFix" alt=""/></dt></dl>
        <div class="ncsc-admin-function">
        <div class="index-search-container">
        <p class="admin-name"><a class="seller_name" href="">seller</a></p></div>
        <a class="iconshop" href="/index.php/Home/Store/index/store_id/1.html" title="前往店铺" ><i class="icon-home"></i>&nbsp;店铺</a>
        <a class="iconshop" href="/index.php/seller/Admin/admin_info/seller_id/1.html" title="修改密码" target="_blank"><i class="icon-wrench"></i>&nbsp;设置</a>
        <a class="iconshop" href="/index.php/seller/Admin/logout.html" title="安全退出"><i class="icon-signout"></i>&nbsp;退出</a></div></div>
        <div class="center-logo"> <a href="/" target="_blank">
        <img src="images/seller/seller_center_logo.png" class="pngFix" alt=""/></a>
        <h1>商家中心</h1></div>
        <nav class="ncsc-nav">
        <dl >
        <dt><a href="/index.php/seller/Index/index.html">首页</a></dt>
        <dd class="arrow"></dd></dl>
        <dl class="current">
        <dt><a href="/index.php?m=Seller&c=Goods&a=addEditGoods">商品</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Goods/addEditGoods.html'> 商品发布 </a></li>
        <li> <a href='goodsList.html'> 出售中的商品 </a></li>
        <li> <a href='/index.php/seller/Goods/goods_offline.html'> 仓库中的商品 </a></li>
        <li> <a href='/index.php/seller/Goods/stock_list.html'> 库存日志 </a></li>
        <li> <a href='/index.php/seller/Goods/specList.html'> 商品规格 </a></li>
        <li> <a href='/index.php/seller/Goods/brandList.html'> 品牌申请 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Order&a=index">订单物流</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Order/index.html'> 订单列表 </a></li>
        <li> <a href='/index.php/seller/Order/virtual_list.html'> 虚拟订单 </a></li>
        <li> <a href='/index.php/seller/Order/delivery_list.html'> 发货商品 </a></li>
        <li> <a href='/index.php/seller/Plugin/index.html'> 发货设置 </a></li>
        <li> <a href='/index.php/seller/Comment/index.html'> 商品评论 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Promotion&a=flash_sale">促销</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Promotion/flash_sale.html'> 抢购管理 </a></li>
        <li> <a href='/index.php/seller/Promotion/group_buy_list.html'> 团购管理 </a></li>
        <li> <a href='/index.php/seller/Promotion/prom_goods_list.html'> 商品促销 </a></li>
        <li> <a href='/index.php/seller/Promotion/prom_order_list.html'> 订单促销 </a></li>
        <li> <a href='/index.php/seller/Coupon/index.html'> 代金券管理 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Store&a=store_setting">店铺</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Store/store_setting.html'> 店铺设置 </a></li>
        <li> <a href='/index.php/seller/Store/store_decoration.html'> 店铺装修 </a></li>
        <li> <a href='/index.php/seller/Store/navigation_list.html'> 店铺导航 </a></li>
        <li> <a href='/index.php/seller/Store/bind_class_list.html'> 经营类目 </a></li>
        <li> <a href='/index.php/seller/Store/store_info.html'> 店铺信息 </a></li>
        <li> <a href='/index.php/seller/Store/goods_class.html'> 店铺分类 </a></li>
        <li> <a href='/index.php/seller/Store/suppliers_list.html'> 供货商 </a></li>
        <li> <a href='/index.php/seller/Store/store_collect.html'> 店铺关注 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Service&a=ask_list">售后服务</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Service/ask_list.html'> 咨询管理 </a></li>
        <li> <a href='/index.php/seller/Service/return_list.html'> 退货换货 </a></li>
        <li> <a href='/index.php/seller/Service/complain_list.html'> 投诉管理 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Finance&a=withdrawals">统计结算</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Finance/withdrawals.html'> 提现申请 </a></li>
        <li> <a href='/index.php/seller/Finance/remittance.html'> 汇款列表 </a></li>
        <li> <a href='/index.php/seller/Finance/order_statis.html'> 店铺结算记录 </a></li>
        <li> <a href='/index.php/seller/Finance/order_no_statis.html'> 未结算订单 </a></li>
        <li> <a href='/index.php/seller/Report/index.html'> 店铺概况 </a></li>
        <li> <a href='/index.php/seller/Report/finance.html'> 运营报告 </a></li>
        <li> <a href='/index.php/seller/Report/saleTop.html'> 销售排行 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Index&a=store_service">客服消息</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Index/store_service.html'> 客服设置 </a></li>
        <li> <a href='/index.php/seller/Index/store_msg.html'> 系统消息 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Admin&a=index">账号</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Admin/index.html'> 账号列表 </a></li>
        <li> <a href='/index.php/seller/Admin/role.html'> 账号组 </a></li>
        <li> <a href='/index.php/seller/Admin/log.html'> 账号日志 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        <dl >
        <dt><a href="/index.php?m=Seller&c=Distribut&a=goods_list">分销</a></dt>
        <dd>
        <ul>  
        <li> <a href='/index.php/seller/Distribut/goods_list.html'> 分销商品 </a></li>
        <li> <a href='/index.php/seller/Distribut/distribut.html'> 分销设置 </a></li>
        <li> <a href='/index.php/seller/Distribut/rebate_log.html'> 分成记录 </a> </li></ul>
        </dd>
        <dd class="arrow"></dd></dl>
        </nav>
        </div>
        </header> -->
        <!--以下是在线编辑器 代码 -->
        <style>.ncsc-goods-default-pic .goodspic-uplaod .upload-thumb{width: 180px;height:180px; display: inline-block;} .ncsc-goods-default-pic .goodspic-uplaod .upload-thumb img{ height: 160px; width: 160px;} .ncsc-goods-default-pic .goodspic-uplaod .upload-thumb{line-height: 20px;margin-right: 6px;} .ncsc-goods-default-pic .goodspic-uplaod .upload-thumb:nth-child(5n){margin-right: 0;} .ncsc-goods-default-pic{display: inherit;} /*.ncsc-form-goods dl dd{width: 98%;}*/ .text-warning {color: #8a6d3b;}a{ color:#3BAEDA} /*.ncsc-form-goods{padding: 10px;}*/ .table-bordered {border: 1px solid #f4f4f4;} .table { width: 100%;max-width: 100%;margin-bottom: 20px;} ul.group-list {width: 96%;min-width: 1000px; margin: auto 5px;list-style: disc outside none;} ul.group-list li { white-space: nowrap;float: left; width: 150px; height: 25px;padding: 3px 5px;list-style-type: none;list-style-position: outside;border: 0px;margin: 0px;} .row .table-bordered td .btn,.row .table-bordered td img{vertical-align: middle;} .row .table-bordered td{padding: 8px;line-height: 1.42857143;} .table-bordered{width: 100%} .table-bordered tr td{border: 1px solid #f4f4f4;} .btn-success {color: #fff;background-color: #48CFAE;border-color: #398439 solid 1px;} .btn {display: inline-block;padding: 6px 12px;margin-bottom: 0;font-size: 14px; font-weight: 400;line-height: 1.42857143;text-align: center;white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation;touch-action: manipulation;cursor: pointer;-webkit-user-select: none;-moz-user-select: none; -ms-user-select: none;user-select: none;background-image: none;border: 1px solid transparent; border-radius: 4px; } .col-xs-8 {width: 66.66666667%;} .col-xs-4 {width: 33.33333333%;} .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 {float: left;} .row .tab-pane h4{padding: 10px 0;} .row .tab-pane h4 input{vertical-align: middle;} .table-striped>tbody>tr:nth-of-type(odd) {background-color: #f9f9f9;} .ncap-form-default .title{border-bottom: 0} .ncap-form-default dl.row, .ncap-form-all dd.opt/*border-color: #F0F0F0;*/border: none; .ncap-form-default dl.row:hover, .ncap-form-all dd.opt:hover{border: none;box-shadow: inherit;} a:hover {color: #3BAEDA;text-decoration: none;} .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th { padding: 8px;line-height: 1.42857143;vertical-align: top; border-top: 1px solid #ddd;} ul.group-list{min-width: 100%;} input{vertical-align:middle;} .ncsc-form-goods h4{margin: 10px 0 10px 10px;} .clabackkj{background-color: #F5F5F5;border-bottom: solid 1px #E7E7E7;overflow: hidden;} .clabackkj h3{border-bottom: 0;display: inline-block;} .clabackkj .ncbtn{float: right;margin-right: 15px;height: 12px;line-height: 12px;} #tab_goods_images dl dd{width: 99%;} .alert-block{margin-top: 0;} select{ min-width:120px; }</style>
        <!-- <script type="text/javascript">
            window.UEDITOR_Admin_URL = "/public/plugins/Ueditor/";
            var URL_upload = "/index.php/Admin/Ueditor/imageUp/savepath/goods.html";
            var URL_fileUp = "/index.php/Admin/Ueditor/fileUp/savepath/article.html";
            var URL_scrawlUp = "/index.php/Admin/Ueditor/scrawlUp/savepath/article.html";
            var URL_getRemoteImage = "/index.php/Admin/Ueditor/getRemoteImage/savepath/article.html";
            var URL_imageManager = "/index.php/Admin/Ueditor/imageManager/savepath/article.html";
            var URL_imageUp = "/index.php/Admin/Ueditor/imageUp/savepath/article.html";
            var URL_getMovie = "/index.php/Admin/Ueditor/getMovie/savepath/article.html";
            var URL_home = "";</script> -->
        
        <!--以上是在线编辑器 代码 end-->
        <div class="ncsc-layout wrapper">
            <div id="layoutLeft" class="ncsc-layout-left">
                <div id="sidebar" class="sidebar">
                    <div class="column-title" id="main-nav">
                        <span class="ico-goods"></span>
                        <h2>商品</h2></div>
                    <div class="column-menu">
                        <ul id="seller_center_left_menu">
                            <?php if(is_array($leftmenu['list'])): $i = 0; $__LIST__ = $leftmenu['list'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li class='
                            <?php if($actionurl == $vo[url]): ?>current<?php endif; ?>
                        '>
                                    <a href="/index.php?s=/Home/<?php echo ($vo["url"]); ?>"> <?php echo ($vo["name"]); ?></a>
                                </li><?php endforeach; endif; else: echo "" ;endif; ?>
                        </ul>
                    </div>
                </div>
            </div>
            <div id="layoutRight" class="ncsc-layout-right">
                <div class="ncsc-path">
                    <i class="icon-desktop"></i>商家管理中心
                    <i class="icon-angle-right"></i>商品
                    <i class="icon-angle-right"></i>商品发布</div>
                <div class="main-content" id="mainContent">
                    <!-- <div class="tabmenu">
                        <ul class="tab pngFix">
                            <li class="active">
                                <a onclick="select_nav(this);" data-id="tab_tongyong">通用信息</a></li>
                            <li class="normal">
                                <a onclick="select_nav(this);" data-id="tab_goods_images">商品相册</a></li>
                            <li class="normal">
                                <a onclick="select_nav(this);" data-id="tab_goods_spec">商品规格</a></li>
                            <li class="normal">
                                <a onclick="select_nav(this);" data-id="tab_goods_attr">商品属性</a></li>
                            <li class="normal">
                                <a onclick="select_nav(this);" data-id="tab_goods_shipping">商品物流</a></li>
                        </ul>
                    </div> -->
                    <div class="item-publish">
                        <form method="post" id="addEditGoodsForm" action="<?php echo U('insert');?>">
                            <input type="hidden" name="shop_id" id="shop_id" value="<?php echo ($shop_id); ?>">
                            <div class="ncsc-form-goods active" id="tab_tongyong">
                                <h3 id="demo1">商品基本信息</h3>
                                <dl>
                                    <dt>
                                        <i class="required">*</i>商品名称：</dt>
                                    <dd>
                                        <input type="text" value="<?php echo ($_POST['goods_name']); ?>" name="goods_name" class="text w400">
                                        <p class="hint">商品标题名称长度至少3个字符，最长50个汉字</p></dd>
                                </dl>
                                <dl>
                                    <dt>商品简介：</dt>
                                    <dd>
                                        <textarea name="desc" class="textarea h60 w400"><?php echo ($_POST['desc']); ?></textarea>
                                        <p class="hint">商品简介最长不能超过140个汉字</p></dd>
                                </dl>
                                <dl>
                                    <dt>商品关键词：</dt>
                                    <dd>
                                        <p>
                                            <input type="text" value="<?php echo ($_POST['keys']); ?>" name="keys" class="text"></p>
                                        <p class="hint">多个关键词，用空格隔开</p></dd>
                                </dl>
                                <dl>
                                    <dt>商品货号：</dt>
                                    <dd>
                                        <p>
                                            <input type="text" value="<?php echo ($_POST['goods_sn']); ?>" name="goods_sn" class="text"></p>
                                        <p class="hint">商家货号是指商家管理商品的编号
                                            <br>最多可输入20个字符，支持输入中文、字母、数字、_、/、-和小数点</p></dd>
                                </dl>
                                <dl>
                                    <dt>排序：</dt>
                                    <dd>
                                        <p>
                                            <input type="text" value="<?php echo ($_POST['sort_order']); ?>" name="sort_order" class="text"></p>
                                        <p class="hint">请输入数字排序，数字越大越靠前</p>
                                    </dd>
                                </dl>














                                <dl>
                                    <dt>
                                        <i class="required">*</i>商品分类：</dt>
                                    <dd>
                                        <select name="cate_id[]" id="cate_id1" onchange="get_cate_id1()" required="required">
                                            <option value="0">请选择商品分类</option>
                                            <?php if(is_array($cate)): foreach($cate as $key=>$vo): ?><option value="<?php echo ($vo['id']); ?>"><?php echo ($vo['name']); ?></option><?php endforeach; endif; ?>
                                        </select>
                                        <select name="cate_id[]" id="cate_id2" onchange="get_cate_id2()" disabled="disabled">
                                            <option value="0">请选择商品分类</option>
                                        </select>
                                        <select name="cate_id[]" id="cate_id3" onchange="get_cate_id3()" disabled="disabled">
                                            <option value="0">请选择商品分类</option>
                                        </select>

                                        <p class="hint">请选择商品分类</p></dd>
                                </dl>
                                <dl id="para" style="display:none">
                                    <dt>
                                        <i class="required">*</i>商品属性：</dt>
                                    <dd id="goods_para">
                                        <a class="ncbtn ncbtn-mint" title="打开商品属性">打开商品属性</a>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>本店分类：</dt>
                                    <dd>
                                        <select name="shop_cate_id[]" id="shop_cate_id1" onchange="get_shop_cate_id1()">
                                            <option value="0">请选择分类</option>
                                            <?php if(is_array($shopCate)): foreach($shopCate as $key=>$vo): ?><option value="<?php echo ($vo['id']); ?>"><?php echo ($vo['cat_name']); ?></option><?php endforeach; endif; ?>
                                        </select>
                                        <select name="shop_cate_id[]" id="shop_cate_id2" onchange="get_shop_cate_id2()">
                                            <option value="0">请选择分类</option>
                                        </select>
                                        <select name="shop_cate_id[]" id="shop_cate_id3" >
                                            <option value="0">请选择分类</option>
                                        </select>

                                        <p class="hint">可不选,为了用户更好检索到该商品，最好选择</p></dd>
                                </dl>



























                                <dl>
                                    <dt>商品品牌：</dt>
                                    <dd>
                                        <select name="brand_id" id="brand_id">
                                            <option value="0">选择品牌</option>
                                            <?php if(is_array($brand)): foreach($brand as $k=>$vo): ?><option value="<?php echo ($vo['id']); ?>">-- <?php echo ($vo['name']); ?></option><?php endforeach; endif; ?>
                                        </select>
                                        <p class="hint">可不选,为了用户更好检索到该商品，最好选择</p></dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <i class="required">*</i>市场价：</dt>
                                    <dd>
                                        <input name="market_price" value="<?php echo ($_POST['market_price']); ?>" class="text w60" type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')">
                                        <em class="add-on">
                                            <i class="icon-renminbi"></i>
                                        </em>
                                        <span></span>
                                        <p class="hint">价格必须是0.01~9999999之间的数字，此价格仅为市场参考售价，请根据该实际情况认真填写。</p></dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <i class="required">*</i>现金：</dt>
                                    <dd>
                                        <input name="money" id="money" value="<?php echo ($_POST['money']); ?>" class="text w60" type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')">
                                        <em class="add-on">
                                            <i class="icon-renminbi"></i>
                                        </em>
                                        <span></span>
                                        <p class="hint">价格必须是0.01~9999999之间的数字，且不能高于市场价。
                                            <br>此价格为商品实际销售价格，如果商品存在规格，该价格显示最低价格。该价格影响到积分赠送</p></dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <i class="required">*</i>七彩币：</dt>
                                    <dd>
                                        <input name="sell_price" id="sell_price" value="<?php echo ($_POST['sell_price']); ?>" class="text w60" type="text" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')">
                                        <em class="add-on">
                                            <i class="icon-renminbi"></i>
                                        </em>
                                        <span></span>
                                        <p class="hint">价格必须是0.01~9999999之间的数字，且不能高于市场价。
                                            <br>此价格为商品实际销售价格，如果商品存在规格，该价格显示最低价格。该价格影响到积分赠送</p></dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <i class="required">*</i>商品参数：</dt>
                                    <dd>
                                        <table width="500" id="canshu">
                                            <tr style="background-color:#F5F5F5;">
                                                <td align="center">参数名称</td>
                                                <td align="center">参数值</td>
                                                <td align="right" ><input type="button" onclick="addcanshu()" value="添加" /></td>
                                            </tr>
                                            <tr style="background-color:#F5F5F5;">
                                                <td><input type="text" name="para[name][]" size="50"/></td>
                                                <td><input type="text" name="para[value][]" size="50"/></td>
                                                <td><input type="button" onclick="$(this).parent().parent().remove();" value="删除" /></td>
                                            </tr>
                                        </table>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>
                                        <i class="required"></i>状态：</dt>
                                    <dd>
                                        <input type="checkbox" name="is_hot" value="1" />热销
                                        <input type="checkbox" name="is_new" value="1" />新品
                                        <input type="checkbox" name="is_top" value="1" />置顶
                                        <select name="status" id="">
                                            <option value="1">上架</option>
                                            <option value="0">下架</option>
                                        </select>
                                    </dd>
                                </dl>





















                                <dl>
                                    <dt>
                                        <i class="required">*</i>商品图片：</dt>
                                    <dd>
                                        <div class="ncsc-goods-default-pic">
                                            <div class="goodspic-uplaod">
                                                <?php echo UpImage("goods_thumb",100,100,$goods['goods_thumb']);?>
                                                
                                                <p class="hint">仅支持jpg、gif、png、bmp、jpeg，且小于1MB。</p>
                                            </div>
                                        </div>
                                        <div id="demo"></div>
                                    </dd>
                                </dl>

                                <dl>
                                    <dt>
                                        <i class="required">*</i>缩略图：</dt>
                                    <dd>
                                        <div class="ncsc-goods-default-pic">
                                            <div class="goodspic-uplaod">
                                                <?php echo BatchImage("imglist",100,100,$goods['imglist']);?>
                                                
                                                <p class="hint">仅支持jpg、gif、png、bmp、jpeg，且小于1MB。</p>
                                            </div>
                                        </div>
                                        <div id="demo"></div>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt nc_type="no_spec">
                                        <i class="required">*</i>商品库存：</dt>
                                    <dd nc_type="no_spec">
                                        <input name="goods_number" value="<?php echo ($_POST['goods_number']); ?>" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" class="text w60" type="text">
                                        <span></span>
                                        <p class="hint">商铺库存数量必须为0~999999999之间的整数
                                            <br>若启用了库存默认配置，则系统自动计算商品的总数，此处无需卖家填写</p></dd>
                                </dl>
                                <h3 id="demo2">商品详情描述</h3>
                                <dl>
                                    <dt>商品详情描述：</dt>
                                    <dd>
                                        <p>
                                            <script id="editor" type="text/plain" style="width:100%x;height:500px;"></script>
                                            <script>
                                                var ue = UE.getEditor('editor');
                                            </script>
                                        </p>
                                        <p class="hint">商品详情描述</p></dd>
                                </dl>                                

                            </div>
                            <div class="bottom tc hr32">
                                <label class="submit-border">
                                    <input nctype="formSubmit" class="submit" value="保存" type="submit"></label>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div id="cti">
            <div class="wrapper">
                <ul></ul>
            </div>
        </div>
        <div id="faq">
            <div class="wrapper"></div>
        </div>
        <div id="footer">
            <p>
                <a href="/">首页</a>|
                <a href="http://www.tpshop.cn">招聘英才</a>|
                <a href="http://www.tpshop.cn">合作及洽谈</a>|
                <a href="http://www.tpshop.cn">联系我们</a>|
                <a href="http://www.tpshop.cn">关于我们</a>|
                <a href="http://www.tpshop.cn">物流自取</a>|
                <a href="http://www.tpshop.cn">友情链接</a></p>Copyright 2017
            <a href="" target="_blank">TPshop商城</a>All rights reserved.
            <br />本演示来源于
            <a href="http://www.tpshop.cn" target="_blank">www.tpshop.cn</a></div>
        <script type="text/javascript" src="js/jquery.cookie.js"></script>
        <link href="css/perfect-scrollbar.min.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
        <script type="text/javascript" src="js/qtip/jquery.qtip.min.js"></script>
        <link href="js/qtip/jquery.qtip.min.css" rel="stylesheet" type="text/css">
        <div id="tbox">
            <div class="btn" id="msg">
                <a href="/index.php/Seller/index/store_msg.html">
                    <i class="msg">
                        <em>1</em></i>站内消息</a>
            </div>
            <div class="btn" id="im">
                <i class="im">
                    <em id="new_msg" style="display:none;"></em>
                </i>
                <a href="javascript:void(0);">在线联系</a></div>
            <div class="btn" id="gotop" style="display: block;">
                <i class="top"></i>
                <a href="javascript:void(0);">返回顶部</a></div>
        </div>
    

    </body>
    <script>
        function get_cate_id1()
        {
            // 第一步 ， 清除后两个内容
            $("#cate_id2").attr('disabled', 'disabled');
            $("#cate_id3").attr('disabled', 'disabled');

            var cate_id1 = $("#cate_id1").val();
            
            $.ajax({
                url     :   "<?php echo U('Cate/getCat');?>",
                type    :   "post",
                data    :   {pid:cate_id1},
                dataType:   'json',
                success :   function(re){
                    var sel = "<option value='0'>请选择分类</option>";
                    $("#cate_id3").empty().append(sel);

                    $.each(re,function(i, r){
                        sel = sel+"<option value='"+r.id+"'>"+r.name+"</option>";
                    });
                    $("#para").css('display', 'none');
                    $("#cate_id2").empty().removeAttr('disabled');
                    $("#cate_id2").append(sel);
                }
            });
        }

        function get_cate_id2()
        {
            $("#cate_id3").attr('disabled', 'disabled');

            var cate_id2 = $("#cate_id2").val();

            $.ajax({
                url     :   "<?php echo U('Cate/getCat');?>",
                type    :   "post",
                data    :   {pid:cate_id2},
                dataType:   'json',
                success :   function(re){
                    if(re.length > 0){
                        var sel = "<option value='0'>请选择分类</option>"; 

                        $.each(re,function(i, r){
                            sel = sel+"<option value='"+r.id+"'>"+r.name+"</option>";
                        });

                        $("#para").css('display', 'none');
                        $("#cate_id3").empty().removeAttr('disabled');
                        $("#cate_id3").append(sel);
                    }else{
                        $("#para").css('display', 'block');
                        $("#cate_id3").empty().removeAttr('disabled');
                    }
                }
                
            });
        }

        function get_cate_id3()
        {
            $("#para").css('display', 'none');
        }

        function get_shop_cate_id1()
        {
            $("#shop_cate_id2").attr('disabled', 'disabled');
            $("#shop_cate_id3").attr('disabled', 'disabled');

            var shop_cate_id1 = $("#shop_cate_id1").val();
            var shopId       = $("#shop_id").val();
            
            $.ajax({
                url     :   "<?php echo U('ShopCate/getCat');?>",
                type    :   "post",
                data    :   {shop_id:shopId, pid:shop_cate_id1},
                dataType:   'json',
                success :   function(re){
                    var sel = "<option value='0'>请选择分类</option>";
                    $("#shop_cate_id3").append(sel);

                    $.each(re,function(i, r){
                        sel = sel+"<option value='"+r.id+"'>"+r.cat_name+"</option>";
                    });
                    $("#shop_cate_id2").empty().removeAttr('disabled');
                    $("#shop_cate_id2").append(sel);
                }
            });
        }

        function get_shop_cate_id2()
        {
            $("#shop_cate_id3").attr('disabled', 'disabled');

            var shop_cate_id2 = $("#shop_cate_id2").val();
            var shopId       = $("#shop_id").val();

            $.ajax({
                url     :   "<?php echo U('ShopCate/getCat');?>",
                type    :   "post",
                data    :   {shop_id:shopId, pid:shop_cate_id2},
                dataType:   'json',
                success :   function(re){
                    if(re.length > 0){
                        var sel = "<option value='0'>请选择分类</option>";

                        $.each(re,function(i, r){
                            sel = sel+"<option value='"+r.id+"'>"+r.cat_name+"</option>";
                        });

                        $("#shop_cate_id3").empty().removeAttr('disabled');
                        $("#shop_cate_id3").append(sel);
                    }else{
                        $("#shop_cate_id3").empty().removeAttr('disabled');
                    }
                }
                
            });
        }

        /*****************  参数  *********************/
        function para_ajax(cate_id)
        {
            $.ajax({
                url     :   "<?php echo U('para_ajax');?>",
                type    :   "post",
                data    :   {cate_id:cate_id},
                dataType:   'json',
                success :   function(re){
                    $.each(re,function(i, r){
                            dl = '<dl id="dlAttr'+r.id+'" style="background-color:#F5F5F5;">';
                            dl += '<dt><span onclick="addrow('+r.id+')" >+</span> '+r.attr_name+'</dt>';
                            dl += '<dd><input name="attr['+r.id+'][]" value="" size="50" /></dd>';
                            dl += '</dl>';
                            $("#goods_para").append(dl);
                        });
                }
            });
        }

        //增加行
        function addrow(id){
            var dl = '<dl>';
                dl += '<dt></dt>';
                dl += '<dd><input name="attr['+id+'][]" value="" size="50" /><span onclick="delrow(this)" >X</span></dd>';
                dl += '</dl>';
            $("#dlAttr"+id).append(dl);
        }
        //删除行
        function delrow(obj){       
            $(obj).parent().parent().remove();
        }

        /*****************  end  *********************/

        //添加参数行
        function addcanshu(){
            tr = '<tr>';
            tr += '<td><input type="text" name="para[name][]" size="50"/></td>';
            tr += '<td><input type="text" name="para[value][]" size="50"/></td><td><input type="button" onclick="$(this).parent().parent().remove();" value="删除" /></td>';
            tr += '</tr>';
            $("#canshu").append(tr);
        }


        $(".ncbtn").click(function(){
            
            var cate_id2 = $("#cate_id2").val();
            var cate_id3 = $("#cate_id3").val();

            if(cate_id3){
                para_ajax(cate_id3);
            }else{
                para_ajax(cate_id2);
            }

            $(this).hide();
        });

    </script>  
</html>